<%@ page import="psl.*" %>
<%--
  Created by IntelliJ IDEA.
  User: phiteshkumar
  Date: Mar 6, 2007
  Time: 11:43:00 AM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="TagXML" prefix="Search" %>
<%
    UserSession moUserSession = (UserSession) session.getAttribute ("UserSession");
    SaleEntry moSaleEntry= (SaleEntry) moUserSession.getCurrentPage ();
    String msCustId = moUserSession.msCustId;
    boolean Tag=moSaleEntry.mbSaveFlag;
%>
<html>
  <head>
      <title>Item Bill</title>
      <link href='Stylesheet.css' type='text/css' rel='stylesheet'>
      <script type='text/javascript' src='ROController.js' language='JavaScript'></script>
  </head>
  <body>
  <form name='DataForm' onsubmit='return false;'>
    <input type='hidden' name='action_fld'>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="2">
                <%@ include file="ROCommon/Head.jsp" %>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <table width="100%">
                    <tr height="22">
                        <td bgcolor="salmon" align="left"></td>
                        <td bgcolor="salmon" align="center"><font color='black' size='3' style='font-weight:bold;'>Sale Entry Page</font></td>
                        <td width="35" bgcolor="burlywood" align="right"><a href="javascript:performHome()"><font color='black' size='2' style=font-weight:bold;>Home</font></a></td>
<%                      if(moUserSession.msLogin!=null)
                        {
%>
                        <td width="35" bgcolor="burlywood" align="right"><a href="javascript:logout()"><font color='navy' size='2' style=font-weight:bold;>LogOut</font></a></td>
<%
                        }
%>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="center" valign="top">
                <table width=100% >
                    <tr>
                        <td bgcolor="silver" height="25" align="left" colspan="2"><font style="font-size:17;color:black;">Sale Entry</font></td>
                    </tr>
                    <tr>
                        <td bgcolor="lavenderblush" >
                            <table border="0" width="100%">
                                <tr>
                                    <td width=30%>
                                        <table class="registere" border="0">
                                            <tr>
                                                 <td >Sale No. :</td>
                                                 <td>
                                                 <%
                                                     String lsSaleNo=CommonServices.getMaxNoFormDB("cust_order_web","sno","","S");
                                                 %>
                                                     <input type=text disabled value=<%=lsSaleNo%>>
                                                     <input type=hidden name=saleno value=<%=lsSaleNo%>>
                                                 </td>
                                             </tr>
                                             <tr>
                                                 <td>Customer Id :</td>
                                                 <td>
                                                     <input type=text disabled=disabled value='<%=msCustId%>'/>
                                                     <input type=hidden name='customerid' value='<%=msCustId%>'/>
                                                 </td>
                                             </tr>
                                             <tr>
                                                 <td>Card No. :</td>
                                                 <td><input type=text name=cardno> </td>
                                             </tr>
                                             <tr>
                                                 <td>Card Type :</td>
                                                 <td>
                                                     <select class="expand" name=cardtype>
                                                         <option>CraditCard(ICICI)</option>
                                                         <option>DabitCard(ICICI)</option>
                                                         <option>CraditCard(HDFC)</option>
                                                         <option>DabitCard(HDFC)</option>
                                                         <option>CraditCard(SBI)</option>
                                                         <option>DabitCard(SBI)</option>
                                                         <option>CraditCard(BOB)</option>
                                                         <option>DabitCard(BOB)</option>
                                                         <option>CraditCard(HSBC)</option>
                                                         <option>DabitCard(HSBC)</option>
                                                     </select>
                                                 </td>
                                             </tr>
                                           </table>
                                    </td>
                                    <td width=70%>
                                        <table class="registere" border="0">
                                             <tr>
                                                 <td>Total Amount :</td>
                                                 <td>
                                                     <input type=text disabled=disabled value='<%=moUserSession.msTotal%>$'/>
                                                     <input type=hidden name=totalamount value='<%=moUserSession.msTotal%>'/>
                                                 </td>
                                             </tr>
                                             <tr>
                                                 <td>Shipping Cost :</td>
                                                 <td>
                                                     <input type=text disabled=disabled value='100'/>
                                                     <input type=hidden  name=shippingcost value='100'/>
                                                 </td>
                                             </tr>
                                             <tr>
                                                 <td>Tax(%) :</td>
                                                 <td>
                                                     <input type=text disabled="disabled" value='10'/>
                                                     <input type=hidden  name=tax value='10'/>
                                                </td>
                                             </tr>
                                             <%
                                                 float ldfamount=Float.parseFloat(moUserSession.msTotal);
                                                 ldfamount=ldfamount+100.0f;
                                                 ldfamount=ldfamount+(ldfamount*0.1f);
                                                 moUserSession.msTotal=ldfamount+"";
                                             %>
                                             <tr>
                                                 <td>Final Amount :</td>
                                                 <td>
                                                     <input type=text disabled="disabled" value='<%=ldfamount%>$'/>
                                                     <input type=hidden  name=finalamount value='<%=ldfamount%>'/>
                                                 </td>
                                             </tr>
                                           </table>
                                    </td>
                                </tr>
                            </table>
                       </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr height="35" valign="middle">
            <td colspan="2" align="left">
<%
            if(Tag){
%>
                <button style='height:23px;width:50px;' onMouseOver="className='activeImageButton';"
                  onMouseOut="className='imageButton';" class='imageButton' disabled id='save'
                  onclick="performSave();" accesskey='S' type='button'>
                    <u>S</u>ave
                </button>
                &nbsp;
                <button style='height:23px;width:55px;' disabled onMouseOver="className='activeImageButton';"
                  onMouseOut="className='imageButton';" class='imageButton' id='cancel'
                  onclick="performCancel();" accesskey='C' type='button'>
                    <u>C</u>ancel
                </button>
        <%
            }
            else
            {
        %>
                <button style='height:23px;width:50px;' onMouseOver="className='activeImageButton';"
                  onMouseOut="className='imageButton';" class='imageButton' id='save'
                  onclick="performSave();" accesskey='S' type='button'>
                    <u>S</u>ave
                </button>
                &nbsp;
                <button style='height:23px;width:55px;' onMouseOver="className='activeImageButton';"
                  onMouseOut="className='imageButton';" class='imageButton' id='cancel'
                  onclick="performCancel();" accesskey='C' type='button'>
                    <u>C</u>ancel
                </button>
        <%
            }
        %>
            </td>
        </tr>
        <tr>
            <td align="center" valign="top">
                <table width="100%">
                    <tr><td bgcolor="silver" height="25" align="left" colspan="2"><font style="font-size:17;color:black;">Final Bill</font></td></tr>
                    <tr>
                        <td>
                            <Search:ROTag
                                ROType="SaleEntryBill"
                                SQLQuery="Select * From product_detail_web"
                                ROSession='<%=moUserSession%>'
                                ROPage='<%=moSaleEntry%>'>
                            </Search:ROTag>
                        </td>
                    </tr>
                </table>
            </td>
         </tr>
      </table>
    <%

        if(moUserSession.msConform!=null)
        {

    %>
          &nbsp;&nbsp;
          <div class='conformMessage_body'>
              <table width=100% border=0 cellspacing=1 cellpadding=0>
                  <tr>
                      <td align=center><b><%=moUserSession.msConform%></b></td>
                  </tr>
              </table>
          </div>
          <%
    }
    if(moUserSession.msError!=null)
    {

%>
      &nbsp;&nbsp;
      <div class='message_body'>
          <table width=100% border=0 cellspacing=1 cellpadding=0>
              <tr>
                  <td width=10>
                     <img src='img/feedback-error.gif'>&nbsp;
                  </td>
                  <td><b><%=moUserSession.msError%></b></td>
              </tr>
          </table>
      </div>
      <%
}
      %>
    </form>
  </body>
</html>